﻿namespace ElevatorApplication
{
    public class ButtonsOfFloor
    {
        public ButtonsOfFloor(int floorNumber)
        {
            //Validation

            FloorNumber = floorNumber;

            IsUpButtonBePushed = false;
            IsDownButtonBePushed = false;
            IsNumberButtonBePushed = false;
        }

        public int FloorNumber { get; private set; }
        public bool IsUpButtonBePushed { get; private set; }
        public bool IsDownButtonBePushed { get; private set; }
        public bool IsNumberButtonBePushed { get; private set; }

        public void PushUpButton()
        {
            IsUpButtonBePushed = true;
        }

        public void PushDownButton()
        {
            IsDownButtonBePushed = true;
        }

        public void PushNumberButton()
        {
            IsNumberButtonBePushed = true;
        }

        public void ResetButtonsWhenElevatorStopped()
        {
            IsUpButtonBePushed = false;
            IsDownButtonBePushed = false;
            IsNumberButtonBePushed = false;
        }

        public void ResetButtonsWhenElevatorGoingUp()
        {
            IsUpButtonBePushed = false;
            IsNumberButtonBePushed = false;
        }

        public void ResetButtonsWhenElevatorGoingDown()
        {
            IsDownButtonBePushed = false;
            IsNumberButtonBePushed = false;
        }
    }
}
